<?php
	session_start();
	require_once("../db_connect.php");
	require_once("filter.php");


	//会員一覧表示
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"  href="../../css/admin.css" type="text/css" />
<head>
<title>管理者画面</title>

		<div id="topmain" >
			<div id="topwaku">管理ページ</div>
				<div id="enpty"></div>
					<div id="topimage"><a href="manager_create.php" >管理者登録</a></div>
					<div id="topimage"><a href="ManagerLogout.php" >ログアウト</a></div>
		</div>
		<div id="leftmain">
			<div id="leftmainwaku">
				<div id="koumoku"><a href="../../manager_index.php" >・管理トップページ</a></div>
				<div id="koumoku"><a href="manage_user_insert.php" >・新規会員登録</a></div>
				<div id="koumoku"><a href="manage_position.php" >・職業一覧</a></div>
				<div id="koumoku"><a href="manage_treatment.php" >・待遇一覧</a></div>
				<div id="koumoku"><a href="manage_main_category.php" >・カテゴリ管理</a></div>
				<div id="koumoku"><a href="manage_volunteer.php" >・ボランティア管理</a></div>
			</div>
		</div>
		<div id="centerup">
			<div id="centerinsert">
			<div id="centerinsert2">
			</head>
       <body>
<form action="ManageUsersDelete.php" method="POST" >
<table border="1" >
<tr>
<th></th>
<th>一般会員ID</th>
<th>ログインID</th>
<th>姓</th>
<th>名</th>
<th>姓かな</th>
<th>名かな</th>
<th>ニックネーム</th>
<th>出身</th>
<th>詳細</th>
<th>編集</th>
<th>削除</th>
</tr>
<?php

$sth = "SELECT user_id,login_id,family_name,given_name,family_kana,given_kana,nick_name,pref,Post_ID,
			   birth_day,phone_number,gender,Post_ID,password,email,Group_name,Group_kana,Information,url,Group_ID
		FROM user";

$res =& $db->query($sth);
	if (PEAR::isError($res)) {			//SQLの実行に失敗すればここでエラー文を出力
		die($res->getMessage());
	}
	while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
		echo "<tr>";
		echo "<th><input type='checkbox' name='test[]' value='".$row['user_id']."' /></th>";
		echo "<th>".$row['user_id']."</th>";
		echo "<th>".$row['login_id']."</th>";
		echo "<th>".$row['family_name']."</th>";
		echo "<th>".$row['given_name']."</th>";
		echo "<th>".$row['family_kana']."</th>";
		echo "<th>".$row['given_kana']."</th>";
		echo "<th>".$row['nick_name']."</th>";
		echo "<th>".$row['pref']."</th>";
		echo "<th><a href='manage_user_detail.php?user_detail_id=".$row['user_id']."' >詳細</a></th>";
		echo "<th><a href='manage_user_update.php?user_update_id=".$row['user_id']."' >編集</a></th>";
		echo "<th><a href='ManageUserDelete.php?user_delete_id=".$row['user_id']."' >削除</a></th>";
		echo "</tr>";
	}
?>
</table>
<input type="submit" value="削除" />
</form>
</div>
</div>
</div>
</body>
</html>